<template>
  <div>
    <div style="height: 40px">
      <h1 style="float: left">医生详情</h1>
      
      <el-button style="float: right" @click="back">返回</el-button>
      <div style="clear: both"></div>
    </div>
    <div>
      <table  border=1 cellpadding=8 cellspacing=0 style="margin-left: 0px; width: 100%" >
        <tr>
          <td colspan = "5">基本信息</td>
        </tr>
        <tr>
          <td rowspan="5" style="width:140px; padding: 0px 0px 0px 0px">
            <img :src="imageUrl" style="width:140px; margin: 0px" >
          </td>
          <td>ID</td>
          <td>{{ doctor.id }}</td>
          <td>姓名</td>
          <td>{{ doctor.name }}</td>
        </tr>
        <tr>
          <td>手机号</td>
          <td>{{ doctor.telephone }}</td>
          <td>平台科室</td>
          <td>{{ doctor.department }}</td>
        </tr>
        <tr>
          <td>医院</td>
          <td>{{ doctor.hospital }}</td>
           <td>邮箱地址</td>
          <td>{{ doctor.email }}</td>
        </tr>
        
        <tr>
          <td>职称</td>
          <td>{{ doctor.professionalTitle }}</td>
          <td>医院科室</td>
          <td>{{ doctor.department }}</td>
        </tr>
        <tr>
          <td>注册时间</td>
          <td>{{doctor.createTime}}</td>
          <td>银行卡号</td>
          <td>{{ doctor.bankNumber }}</td>
        </tr>
      </table>
    </div>
    <div style="border: solid 1px #ebebeb;">
      <div style="height: 45px; background-color: #f2f2f2; padding: 10px 0px 0px 10px">
        擅长
      </div>
      <div style="height: 60px; padding: 30px 0px 0px 10px">
        {{ doctor.speciality }}
      </div>
    </div>

    <div style="border: solid 1px #ebebeb;">
      <div style="height: 45px; background-color: #f2f2f2; padding: 10px 0px 0px 10px">
        简介
      </div>
      <div style=" padding: 10px 0px 10px 10px">
        {{doctor.introduction}}
      </div>
    </div>

  </div>
</template>

<script>
export default {
  name: "DoctorInfo",
  data() {
    return {
     doctor: null,
      //头像地址
      imageUrl: '',
    };
  },
  methods: {
    back(){
      this.$router.go(-1)
    }
  },
  created() {
    this.doctor = this.$route.params.doctor
    this.imageUrl = "http://localhost:9527" +this.doctor.imgUrl

  }
}
</script>

<style scoped>

</style>
